<div class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="hideShowEditor<?=$name?>">
	<span class="ui-button-text"><?=Yii::t('core','Open|Hide editor')?></span>
</div>
<textarea id="ckeditor<?=$name?>" name="_form[<?=$name?>]"><?=$value?></textarea>
<script type="text/javascript">
	var editor<?=$name?> = '';
	$('#hideShowEditor<?=$name?>').click(function (){
		if (editor<?=$name?>){
			$('#ckeditor<?=$name?>').val(editor<?=$name?>.getData());
			editor<?=$name?>.destroy();
			editor<?=$name?> = null;
			$('#ckeditor<?=$name?>').css('display','');
		}else{
			$('#ckeditor<?=$name?>').css('display','none');
			editor<?=$name?> = CKEDITOR.appendTo('ckeditor<?=$name?>Div', {}, $('#ckeditor<?=$name?>').val());
		}
	});
</script>
<div id="ckeditor<?=$name?>Div"></div>